package br.feevale.jogo.components;

import gnu.io.CommPortIdentifier;
import java.util.Enumeration;
import javax.swing.JComboBox;

public class ComboPortas extends JComboBox<String> {
	
	private static final long serialVersionUID = 1L;

	public ComboPortas(){

		@SuppressWarnings("unchecked")
		Enumeration<CommPortIdentifier> listaDePortas = CommPortIdentifier.getPortIdentifiers();
		
		while (listaDePortas.hasMoreElements()) {
			CommPortIdentifier ips =(CommPortIdentifier)listaDePortas.nextElement();
			addItem(ips.getName());
		}
		
	}
	
}
